<?php

/**
 * Summary form base class.
 *
 * @package    FinalsClub
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 12815 2008-11-09 10:43:58Z fabien $
 */
class BaseSummaryForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'         => new sfWidgetFormInputHidden(),
      'created_at' => new sfWidgetFormDateTime(),
      'updated_at' => new sfWidgetFormDateTime(),
      'user_id'    => new sfWidgetFormPropelChoice(array('model' => 'User', 'add_empty' => false)),
      'group_id'   => new sfWidgetFormInput(),
      'course_id'  => new sfWidgetFormInput(),
      'type'       => new sfWidgetFormInput(),
      'type_id'    => new sfWidgetFormInput(),
      'text'       => new sfWidgetFormTextarea(),
      'title'      => new sfWidgetFormInput(),
      'sub_title'  => new sfWidgetFormInput(),
      'author'     => new sfWidgetFormInput(),
      'category'   => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id'         => new sfValidatorPropelChoice(array('model' => 'Summary', 'column' => 'id', 'required' => false)),
      'created_at' => new sfValidatorDateTime(array('required' => false)),
      'updated_at' => new sfValidatorDateTime(array('required' => false)),
      'user_id'    => new sfValidatorPropelChoice(array('model' => 'User', 'column' => 'id')),
      'group_id'   => new sfValidatorInteger(array('required' => false)),
      'course_id'  => new sfValidatorInteger(array('required' => false)),
      'type'       => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'type_id'    => new sfValidatorInteger(array('required' => false)),
      'text'       => new sfValidatorString(array('required' => false)),
      'title'      => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'sub_title'  => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'author'     => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'category'   => new sfValidatorString(array('max_length' => 255, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('summary[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Summary';
  }


}
